package com.itbaizhan.myorder.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
//监听过期订单
@Component
public class ExpireOrderConsumer {
    @RabbitListener(queues = "expire_queue")
    public void listenMessage(String orderId){
        System.out.println("查询"+orderId+"号订单的状态，如果已支付无需处理，如果未支付，则取消订单");
    }

    @RabbitListener(queues = "delayed_queue")
    public void listenMessage2(String orderId){
        System.out.println("查询"+orderId+"号订单的状态，如果已支付无需处理，如果未支付，则取消订单");
    }
}
/*下单测试：访问http://localhost:8080/place/10001*/